<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>操作列表</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link href="/oa/css/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/oa/js/datePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/oa/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="/oa/js/myDate.js"></script>
<script type="text/javascript">
	function topage(page) {
		var form = document.forms[0];
		form.currentpage.value = page;
		form.submit();
	}
	$(document)
			.ready(
					function(e) {
						$("#checkAll").click(
								function() {
									$("body :checkbox").attr("checked",
											$("#checkAll").attr("checked"));
								});
						$("#btnDel")
								.click(
										function() {
											var sure = confirm("确认删除？")
											if(sure){
												var form = document.forms[0];
												form.action = '<s:url namespace="/control/sysmanage" action="deleteOperate" />';
												form.submit();
											}else{
												return false;
											}
										});
						$("#btnSelect").click(function(){
							if($("#startDate").val() == "" || $("#endDate").val() == ""){
								alert("请选择开始和结束时间");
								return false;
							}else{
								var form = document.forms[0];
								form.currentpage.value = 1;
								form.submit();
							}
						});
						$("#selectDiv :text").focus(function(){
						  this.blur();
						});
						$("#today").click(function(){
							$("#startDate").val(getNowDateStart());
							$("#endDate").val(getNowDateEnd());
						});
						$("#week").click(function(){
							$("#startDate").val(getWeekStart());
							$("#endDate").val(getWeekEnd());
						});
						$("#mounth").click(function(){
							$("#startDate").val(getMonthStart());
							$("#endDate").val(getMonthEnd());
						});
					});
</script> 
</head>
<body>
	<div class="page_title">&nbsp;登陆日志</div>
	<hr size="1px">
	<s:form namespace="/control/sysmanage" action="listLoginLog" id="loginLogForm">
		<div id="selectDiv">
			选择日期:
			<s:textfield id="startDate" name="startDate"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd 00:00:00'})" />---
			<s:textfield id="endDate" name="endDate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd 23:59:59'})" />
			<input type="radio" id="today"  name="date"/>本日
			<input type="radio" id="week"  name="date"/>本周
			<input type="radio" id="mounth" name="date"/>本月
			<input id="btnSelect" type="button" value="搜索" />
		</div>
		<br/>
		<div class="button_bar"></div>
		<table class="data_list_table">
			<tr>
				<td align="center"><input type="checkbox" id="checkAll" />全选</td>
				<td colspan="6"><input type="button" value="批量删除" id="btnDel" />
				</td>
			</tr>
			<tr>
				<th>选择</th>
				<th>编号</th>
				<th>操作人员</th>
				<th>登陆时间</th>
				<th>登陆是否成功</th>
				<th>登陆IP</th>
				<th>登陆备注</th>
			</tr>

			<s:hidden name="currentpage"></s:hidden>
			<s:iterator value="pageView.records" status="entry">
				<tr>
					<td class="list_data_number"><input type="checkbox"
						value="${id}" name="delId" />
					</td>
					<td class="list_data_number">${id}</td>
					<td class="list_data_text">${user.userName}</td>
					<td class="list_data_text"><s:date name="loginTime" format="yyyy年MM月dd日  hh:mm:ss"/></td>					
					<td class="list_data_text"><s:if test="isSuccess()">成功</s:if><s:else>失败</s:else></td>
					<td class="list_data_text">${loginUserIp }</td>
					<td class="list_data_text">${loginDesc}</td>
				</tr>
			</s:iterator>
			<tr>
				<th colspan="7" class="pager">
					<div class="pager">
						<s:include value="/page/share/paging.jsp"></s:include>
					</div></th>
			</tr>

		</table>
	</s:form>
</body>
</html>
